<template>
    <el-alert :title="title" :type="type" @close="close">
    </el-alert>
</template>

<script>
    export default {
        props: {
            title: {
                type: String,
                default: ''
            },
            type: {
                type: String,
                default: ''
            }
        },
        methods: {
            close() {
                this.$store.commit('setAlert', '')
                this.$emit('close')
            }
        }
    }
</script>

<style scoped lang="scss">
    .el-alert {
        width: 97.5%;
        margin-left: 1.25%;
        margin-top: 20px;
    }
</style>